<%@ include file="/common/taglibs.jsp"%>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form"%>
<style type="text/css">
	.inputtxt{width:300px}
</style>
	<div id="jFieldErrorDiv" class="warning_msg" style="display:none"></div>
	<form:form method="post" cssClass="mainForm" id="appResourceForm" commandName="appResource" action="${ctxPath}/frontResource.html" onsubmit="return validateAppResource(this);">
		<input type="hidden" name="appResourceId" value="${appResource.resourceId}"/> 
		<table  width="100%" border="0" cellspacing="0" cellpadding="0" class="com_modi_table">
			<tr>
	        <th width="120">权限组</th>
	        <td>
	        	<select id="initparent1" name="appResourceGroup.resourceGroupId">
	        	<c:forEach var="pg" items="${pgroups}"><option value="${pg.resourceGroupId}" ${pg.resourceGroupId eq appResource.appResourceGroup.resourceGroupId || pg.resourceGroupId eq parentId?'selected="selected"':''}>${pg.groupName}</option></c:forEach>
	        	</select>
	        </td>
	    </tr>
	 		<tr>
	        <th><StoreAdmin:label key="appResource.resourceName"/></th>
	        <td>
	        	<input type="text" id="resourceName" name="resourceName" value="${appResource.resourceName}" class="inputtxt"/>
	        </td>
	    </tr>
	    <tr>
	        <th><StoreAdmin:label key="appResource.resourceString"/></th>
	        <td>
	        	<input type="text" id="resourceString" name="resourceString" value="${appResource.resourceString}" class="inputtxt"/>
	        </td>
	    </tr>
	 		<tr>
	        <th><StoreAdmin:label key="appResource.resourceDesc"/></th>
	        <td>
	        	<spring:bind path="appResource.resourceDesc">
	        		<textarea cols="60" rows="4" id="${status.expression}" name="${status.expression}" class="textareatxt">${status.value}</textarea>
	            </spring:bind>
	        </td>
	    </tr>
  	</table>
</form:form>

<v:javascript formName="appResource" staticJavascript="false" />
<script type="text/javascript">
    document.forms["appResourceForm"].elements["resourceName"].focus();
</script>
